import React, { useState } from 'react'
export default function App() {
  const [count, setCount] = useState(0)
  const addCount = () => { setCount(count + 1) }
  const [isShow, setIsShow] = useState(true)
  return (<>
    <h4>{count}</h4>
    <button onClick={addCount}>+1</button><br />
    <button onClick={() => setIsShow(!isShow)}>切换显示或者隐藏</button>
    <div style={{ display: isShow ? 'none' : '' }} >盒子</div>
  </>)
}
